package 数据结构.章节09._160_栈;

import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;

/**
 * @author 挚爱之夕
 * @date 2021/10/13 - 10 - 13 - 15:16
 * @Description: 数据结构.章节09._160_栈
 * @Version: 1.0
 */
public class MyStackTest {
    MyStack<Object> stack = new MyStack<>();
    @Test
    @Before
    public void push() {
        stack.push("0");
        stack.push("1");
        stack.push("2");
        stack.push("3");
    }

    @Test
    public void pop() {
        Assert.assertEquals("3",stack.peek());
        stack.pop();
        stack.pop();
        stack.pop();
        stack.pop();
        Assert.assertTrue(stack.isEmpty());
//        stack.pop();    //抛空栈异常

    }

    @Test
    public void isEmpty() {
    }

    @Test
    public void peek() {
    }

    @Test
    public void getSize() {
    }
}